<template>
    <div>
        <van-cell :title="$store.state.userInfo.nickName" :label="`手机：${$store.state.userInfo.mobile}`" is-link to="/mine/edit"></van-cell>
        <van-cell-group>
            <van-cell title="手机号码" :value="$store.state.userInfo.mobile"></van-cell>
            <van-cell title="修改登录密码" is-link to="/editPassword/login"></van-cell>
            <van-cell title="修改支付密码" is-link to="/editPassword/pay" ></van-cell>
            <van-cell title="退出登录" is-link @click="loginout"></van-cell>
        </van-cell-group>
    </div>
</template>

<script>
export default {
    name: 'info',
    data() {
        return {}
    },

    methods: {
        loginout() {
            this.$dialog.confirm({
                message: '是否退出登录？'
            }).then(() => {
                localStorage.removeItem("token");
                this.$store.commit('clearUserInfo');
                this.$router.push('/login');
            }).catch(() => {})
        }
    }
}
</script>

<style>

</style>
